package com.xiaocg.completeFuture;

import lombok.Getter;

import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;

@Getter
public class Stu {
    private String name;

    public Stu(String name) {
        this.name = name;
    }

    public Integer getAge(){
        try {
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return ThreadLocalRandom.current().nextInt(20);
    }
}
